import Vue from 'vue'

let filters = {
  price (num, unit = '￥', fixedLength = 2) {
    return unit + num.toFixed(fixedLength)
  }
}

Object.keys(filters).forEach(key => Vue.filter(key, filters[key]))

export default filters
